#pip install pyhanlp  -i https://pypi.tuna.tsinghua.edu.cn/simple

from pyhanlp import HanLP

text = "这是一个测试的句子。"

# 进行分词
tokens = HanLP.segment(text)
words = [term.word for term in tokens]
print("分词结果:", words)